<@mits.headerDiv />

   <script type='text/javascript' src='${base}/dwr/interface/trackLogMgr.js'></script>
  <script type='text/javascript' src='${base}/dwr/engine.js'></script>
  <script type='text/javascript' src='${base}/dwr/util.js'></script>

<script type="text/javascript">
var timeHandler;
function initRefrash(){
	
  timeHandler=setTimeout("location.reload()",5000);

}
function stopRefrash(){
   
	if(timeHandler !=undefined){
		clearTimeout(timeHandler);
		timeHandler=undefined;
	}
	

}
function start() {
	$('btnSpan').innerHTML = '';
	$('btnSpan').innerHTML ='<a href="javascript:onClick=stop();"><font size="4" color="red">停    止</font></a>';

	window.frames.checkFrash.iframeRefrash();
}
function stop() {
	$('btnSpan').innerHTML = '';
	$('btnSpan').innerHTML ='<a href="javascript:onClick=start();"><font size="4" color="red">开    始</font></a>';
	window.frames.checkFrash.iframeStopRefrash();
}
function doubleClikShowImage(firstPicPath) {
 window.open('${base}/auth/doubleClikShowImage.action?firstPicPath='+firstPicPath);
}
function plateNumberEdit() {
  $('plateNumber').style.borderBottom = '1px solid #000';
 $('plateNumber').style.borderTop = '1px solid #000';
 $('plateNumber').style.borderLeft = '1px solid #000';
 $('plateNumber').style.borderRight = '1px solid #000';
}

function modifyPlatNumber(id) {
	var plateNumberV = $('plateNumber').value;
	$('msg').innerHTML = '';
	if(plateNumberV != "") {
	 trackLogMgr.modifyPlatNumber(id, plateNumberV,modifyPlatNumberCallBack);
	}
}
function modifyPlatNumberCallBack(data) {

 if(data == true) {
 $('msg').innerHTML = "<font color='red'>修改成功！</font>";
 $('plateNumber').style.border ='0px';
 $('plateNumber').style.borderBottom.style = 'none';
 $('plateNumber').style.borderTop.style = 'none';
 $('plateNumber').style.borderLeft.style = 'none';
 $('plateNumber').style.borderRight.style = 'none';
 }
}
 function vehicleInfo(plateNumber) {
  	window.showModalDialog("${base}/auth/surveillance/getVehicleInfoByPlateNumber.action?plateNumber="+encodeURIComponent(plateNumber),"机动车辆详细信息","dialogWidth=760px;dialogHeight=350px"); 
 // window.location = "${base}/auth/surveillance/getVehicleInfoByPlateNumber.action?plateNumber="+plateNumber;
 }
</script>

<div class="Main" id="Main">
	<!--屏幕切换-->
   
    
    
	<!--左边-->
	<!--右边-->
	<div class="Main_body" id="Main_body">
	<input type="hidden" id="tracklogId" name="tracklogId" value="${trackLog?if_exists.id?if_exists}"/>
	 <div>
<@mits.showResourceScript "prototype-1.6.0.2.js" />
<@mits.showBrandingResourceScript "ImgCropper.js" />
<@mits.showBrandingResourceScript "Drag.js" />
<@mits.showBrandingResourceScript "Resize.js" />

<script type="text/javascript">
var isIE = (document.all) ? true : false;

var isIE6 = isIE && ([/MSIE (\d)\.0/i.exec(navigator.userAgent)][0][1] == 6);

var $ = function (id) {
	return "string" == typeof id ? document.getElementById(id) : id;
};

var Class = {
	create: function() {
		return function() { this.initialize.apply(this, arguments); }
	}
}

var Extend = function(destination, source) {
	for (var property in source) {
		destination[property] = source[property];
	}
}

var Bind = function(object, fun) {
	return function() {
		return fun.apply(object, arguments);
	}
}

var BindAsEventListener = function(object, fun) {
	var args = Array.prototype.slice.call(arguments).slice(2);
	return function(event) {
		return fun.apply(object, [event || window.event].concat(args));
	}
}

var CurrentStyle = function(element){
	return element.currentStyle || document.defaultView.getComputedStyle(element, null);
}

function addEventHandler(oTarget, sEventType, fnHandler) {
	if (oTarget.addEventListener) {
		oTarget.addEventListener(sEventType, fnHandler, false);
	} else if (oTarget.attachEvent) {
		oTarget.attachEvent("on" + sEventType, fnHandler);
	} else {
		oTarget["on" + sEventType] = fnHandler;
	}
};

function removeEventHandler(oTarget, sEventType, fnHandler) {
    if (oTarget.removeEventListener) {
        oTarget.removeEventListener(sEventType, fnHandler, false);
    } else if (oTarget.detachEvent) {
        oTarget.detachEvent("on" + sEventType, fnHandler);
    } else { 
        oTarget["on" + sEventType] = null;
    }
};
</script>

<style type="text/css">
#rRightDown,#rLeftDown,#rLeftUp,#rRightUp,#rRight,#rLeft,#rUp,#rDown{
	position:absolute;
	border: 1px solid #333;
	width: 60px;
	height: 60px;
	z-index:500;
	font-size:0;
	opacity: 0.5;
	filter:alpha(opacity=50);
}

#rLeftDown,#rRightUp{cursor:ne-resize;}
#rRightDown,#rLeftUp{cursor:nw-resize;}
#rRight,#rLeft{cursor:e-resize;}
#rUp,#rDown{cursor:n-resize;}

#rLeftDown{left:0px;bottom:0px;}
#rRightUp{right:0px;top:0px;}
#rRightDown{right:0px;bottom:0px;}
#rLeftUp{left:0px;top:0px;}
#rRight{right:0px;top:50%;margin-top:-4px;}
#rLeft{left:0px;top:50%;margin-top:-4px;}
#rUp{top:0px;left:50%;margin-left:-4px;}
#rDown{bottom:0px;left:50%;margin-left:-4px;}

#bgDiv{width:400px; height:300px; border:1px solid #666666; position:relative;}
#dragDiv{border:1px dashed #FFFF00; width:200px; height:150px; top:10px; left:10px; cursor:move; }
</style>
<div class="Main" id="Main">
	<!--屏幕切换-->
   
    
    
	<!--左边-->
	<!--右边-->
	<div class="Main_body" id="Main_body">
	
  				<table width="100%" border="0" cellspacing="0" cellpadding="0">
  				<#if trackLog?exists && trackLog.firstPicPath?exists>
  			<tr>
		    <td width="50%" ondblclick="doubleClikShowImage('${firstPicPath?if_exists}')" ><div id="bgDiv" >
		        <div id="dragDiv"  >
		        </div>
		      </div>
     	 </td>
    		<td ><div id="viewDiv" style="width:400px;height:300px"> </div>
    		</td>
 		 </tr>
 		 <#else>
 			<tr>
		    <td width="50%">
     	 </td>
    		<td ><div id="bgDiv" ><div   style="width:400px;height:200px">  </div></div>
    		</td>
 		 </tr> 		 
 		 </#if>
		</table>	
		
				</div>				  
				  
</div>
 <img id="imgCreat" style="display:none;" />

<script>
<#if trackLog?exists &&  trackLog.firstPicPath?exists>
var ic = new ImgCropper("bgDiv", "dragDiv", "${base}/showimage?firstPicPath=${firstPicPath?if_exists}", {
	Width: ${width?if_exists}, Height:  ${height?if_exists}, Color: "#464646",
	Resize: true,
	Right: "rRight", Left: "rLeft", Up:	"rUp", Down: "rDown",
	RightDown: "rRightDown", LeftDown: "rLeftDown", RightUp: "rRightUp", LeftUp: "rLeftUp",
	Preview: "viewDiv", viewWidth: 400, viewHeight: 300
})
$('bgDiv').focus();
$('bgDiv').style.color = '#464646';
$('dragDiv').style.top = '100px';
$('dragDiv').style.left = '100px';
</#if>

</script>	 
 </div>
 <@mits.showActionMsg /> 

	<table width="100%" border="0" cellpadding="0" cellspacing="1" class="editTable">
            <tbody>
            <tr>
            <td colspan="4"><span id="msg" ></td>
            </tr>
				<tr >
  				<td class="title">号牌号码</td>
                <td class="content"><input type="text" id="plateNumber" name="plateNumber" onfocus="plateNumberEdit()" value="${trackLog?if_exists.plateNumber?if_exists}"
                onKeypress="if (((event.keyCode>= 32 && event.keyCode < 48 ) && event.keyCode != 42)  
					 || (event.keyCode > 57 && event.keyCode < 65) || (event.keyCode > 90 && event.keyCode < 97) || (event.keyCode >= 123 && event.keyCode <= 126)) event.returnValue = false;"
					 maxlength="10" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;">                
                <input type="button" class="button" id="btnsavePlateNumber" name="btnsavePlateNumber" value="保存" onClick="modifyPlatNumber(${trackLog?if_exists.id?if_exists})">
                <a href="javascript:onClick=vehicleInfo($('plateNumber').value)">车辆信息</a></td>
                 <td class="title">号牌种类</td>
                <td class="content">${trackLog?if_exists.plateType?if_exists}</td>				
                				
				</tr>
					<tr >
  				<td class="title">地点</td>
                <td class="content">${trackLog?if_exists.passPort?if_exists.passPortName?if_exists}</td>
                <td class="title">方向</td>
                <td class="content">${trackLog?if_exists.direction?if_exists}</td>		               				
				</tr>	
				<tr >
  				<td class="title">车道号</td>
                <td class="content">${trackLog?if_exists.laneName?if_exists}</td>
                <td class="title">速度</td>
                <td class="content"><#if  trackLog?exists><#if trackLog.speed == 0 || trackLog.speed == -1>未知<#else>${trackLog?if_exists.speed?if_exists} km/h</#if></#if></td>		               				
				</tr>
				<tr >
  				<td class="title">过车时间</td>
                <td class="content" colspan="3">${trackLog?if_exists.passTime?if_exists}</td>                	         
				</tr>	
				<tr >
                <td class="content" colspan="4" align="center"  id="btnSpan" >
                <#if searchLeastRecord?exists && searchLeastRecord?if_exists =='true'>				   
				  <a href="javascript:onClick=stop();" ><font size="4" color="red">停    止</font></a>
				  <#else>
				  
				  <input type="button" name="back" value="上一条" class="button" <#if hasPrev?if_exists == false> onClick="parent.prev()"<#elseif hasPrev?if_exists == true>disabled="true"</#if>/>
				  <input type="button" name="back" value="下一条" class="button" <#if hasNext?if_exists == false> onClick="parent.next()"<#elseif hasNext?if_exists == true>disabled="true"</#if> />				   
				  <input type="button" name="back" value="返回" class="button" onClick="parent.goBack()"/>
				  总记录数:${totalNum?if_exists}条
				  </#if></td>                	         
				</tr>				
				</tbody>
				  </table>

</div>
				 
<#if searchLeastRecord?exists && searchLeastRecord?if_exists =='true'>
<div>
<iframe id="checkFrash"  name="checkFrash" src = "${base}/auth/tracklogIframe.action?searchLeastRecord=${searchLeastRecord?if_exists}&passPortName=${passPortName?if_exists}&direction=${direction?if_exists}" width = "0" height = "0" />
</div>
</#if>


